#ifndef REGISTERWIDGET_H
#define REGISTERWIDGET_H

#include <QWidget>
#include <QLineEdit>
#include <QLabel>
#include <QDialog>
#include <QPushButton>

class RegisterWidget : public QDialog
{
    Q_OBJECT
public:
    explicit RegisterWidget(QWidget *parent = nullptr);

    void clickSubmitBtn();
    // void countDown();   // 倒计时

    // void sendVerifyCode();
    // void sendVerifyCodeDone();

private:
    QLabel* titleLabel;

    QLineEdit* usernameEdit;
    QLineEdit* passwordEdit;
    QLineEdit* phoneEdit;
    QLineEdit* verifyCodeEdit;      // 输入验证码

    QPushButton* sendVerifyCodeBtn; // 获取验证码
    QPushButton* submitBtn;         // 注册

    QString currentPhone = "";    // 记录是使用哪个手机号发送的验证码
    QTimer* timer;
    int leftTime = 30;
};

#endif // REGISTERWIDGET_H
